#include "trackweldendinstructionview.h"
#include "ui_trackweldendinstructionview.h"

TrackWeldEndInstructionView::TrackWeldEndInstructionView(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::TrackWeldEndInstructionView)
{
    ui->setupUi(this);
    setGeometry(5,50,451,544);
}

TrackWeldEndInstructionView::~TrackWeldEndInstructionView()
{
    delete ui;
}

void TrackWeldEndInstructionView::getInput(TrackWeldEndInstruction &instructionParaOut)
{
    instructionParaOut.comment=ui->note_lineEdit->text();
}

void TrackWeldEndInstructionView::updateView()
{
    ui->note_lineEdit->setText(instructionPara.comment);

}

void TrackWeldEndInstructionView::changeLanguage(int language)
{

}

void TrackWeldEndInstructionView::finishEditInstruction(TrackWeldEndInstruction instructionParaIn, QString &instructionStrOut)
{
    instructionStrOut.clear();
    instructionStrOut="Track Weld End";
    instructionStrOut+=";//"+instructionParaIn.comment;

}


void TrackWeldEndInstructionView::on_clearNote_Btn_clicked()
{
    ui->note_lineEdit->setText("");

}

void TrackWeldEndInstructionView::on_save_Btn_clicked()
{
    getInput(instructionPara);
    finishEditInstruction(instructionPara,instructionStr);
//    emit finishEditInstructionSignal();

    emit saveInstructionSignal(instructionStr);
}

